package com.java复习.练习一二四答案.demo4;

import java.util.Scanner;

public class WatchTelevision {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        System.out.println("请输入观看的频道（2--999）");
        int channl = sc.nextInt();

        System.out.println("请输入音量（0--10）");
        int volume = sc.nextInt();

        Television tv = new Television();
        tv.setChannel(channl);
        tv.setVolume(volume);

        System.out.println(tv.getChannel());
        System.out.println(tv.getVolume());
    }
}
